﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

using iPdf.Properties;

namespace iPdf
{
    class WlmStyleTaskbarNotifier: TaskbarNotifier
    {
        const int TimeToShow = 500; //0.5s
        const int TimeToStay = 5000; //5s
        const int TimeToHide = 500; //0.5s

        public WlmStyleTaskbarNotifier()
        {
            this.SetBackgroundBitmap(Resources.Background, Color.FromArgb(255, 0, 220));
            this.SetCloseBitmap(Resources.CloseButton, Color.FromArgb(255, 0, 255), new Point(260, 8));
            this.TitleRectangle = new Rectangle(33, 7, 229, 14);
            this.ContentRectangle = new Rectangle(9, 27, 262, 144);
            this.normalContentFont = new System.Drawing.Font("Arial", 16, FontStyle.Regular, GraphicsUnit.Pixel);
            this.hoverContentFont = new System.Drawing.Font("Arial", 16, FontStyle.Italic | FontStyle.Underline, GraphicsUnit.Pixel);
            this.normalTitleFont = new System.Drawing.Font("Arial", 16, FontStyle.Bold, GraphicsUnit.Pixel); 

            this.CloseClickable = true;
            this.ContentClickable = true;
            this.TitleClickable = false;
            this.KeepVisibleOnMousOver = true;
            this.ReshowOnMouseOver = true;
            this.EnableSelectionRectangle = true;
        }

        public void ShowNotification(string title, string text)
        {
            ShowNotification(title, text, false);
        }

        public void ShowNotification(string title, string text, bool contentAsLink)
        {
            this.ContentClickable = contentAsLink;
            this.EnableSelectionRectangle = contentAsLink;

            this.Show(title, text, TimeToShow, TimeToStay, TimeToHide);
        }

    }
}
